<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
 	<ui:composition >
 			<div style="overflow:auto; width:100%; height:200px">
			<t:dataTable border="1" binding="#{manageProductsBean.dataTable}" value="#{manageProductsBean.productList}" var="singleProduct">
				<t:column id="product_id">
					<f:facet name="header">
						<t:outputText value=" Product ID" />
		      		</f:facet>
					<t:outputText value="#{singleProduct.id}" />
				</t:column>
			
				<t:column id="product_name">
					<f:facet name="header">
						<t:outputText value=" Product Name" />
		      		</f:facet>
					<t:outputText value="#{singleProduct.name}" />
				</t:column>
				<t:column rendered="#{manageUsersBean.isRendered}">
					<f:facet name="header">
						<t:outputText value=" Edit Product" />
		      		</f:facet>
					<t:commandLink value="edit product" action="#{manageProductsBean.displayProduct}" />
				</t:column>
				<t:column rendered="#{manageUsersBean.isRendered}">
					<f:facet   name="header">
						<t:outputText value=" Delete Product" />
		      		</f:facet>
					<t:commandLink value="delete product" action="#{manageProductsBean.deleteProduct}" />	
				</t:column>
			</t:dataTable>
			</div>	
   </ui:composition>
	</body>
 </html>